package com.ruoyi.system.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.Assets;
import com.ruoyi.system.service.IAssetsService;
import com.ruoyi.system.service.ITHouseAssetsService;
import com.ruoyi.system.service.ITLandAssetsService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author cc
 * @date 2024年04月10日 15:37
 */
@Controller
@RequestMapping("/system/land/analysis")
public class LandAnalysisController extends BaseController {
    private String prefix = "analysis/land";

    @Autowired
    private ITLandAssetsService itLandAssetsService;
    @Autowired
    private IAssetsService assetsService;

    @RequiresPermissions("system:land:analysis:view")
    @GetMapping()
    public String house()
    {
        return prefix + "/analysis";
    }

    @RequestMapping("/getAcrge")
    @ResponseBody
    public AjaxResult getAcrge(Assets assets)
    {
        assets.setUrlAdd("land");
        List<Assets> assetsList = assetsService.selectDeptList(assets);
        assetsList.remove(0);
        return success(assetsList);
    }
}
